<template>
    <layout>
        <mt-header title="成长轨迹">
            <a href="/member" slot="left">
                <mt-button icon="back"></mt-button>
            </a>
        </mt-header>
        <ul>
            <li v-for="item in page.list">
                <a class="title_box" :href="'/member/grow/detail?id='+item.id">
                    <img :src="showImage(item.homeImageUrl)"/>
                    <div class="addr">{{ item.title }}</div>
                    <div class="times el-icon-location-outline">{{ item.content }}</div>
                </a>
                <div class="flex_box"></div>
            </li>
        </ul>

        <div class="flex_boxx">
            <a  href="/growth/trajectory/add">
                <img :src="showImage('edu/img/xie.png')"/>
            </a>


        </div>
    </layout>
</template>
<style lang="scss">
    @import "index.scss";
    img{
        width: 100%;
        height: 100%;
    }
</style>
<script type="text/babel">
    import { api, image } from 'framework/config.js';
    import Layout from "component/layout/standard";

    import Vue from 'vue'
    import Mint from 'mint-ui';
    Vue.use(Mint);

    export default {
        components: {
            Layout
        },
        data(){
            return {
            }
        },
        computed: {
            api(){
                return api();
            }
        },
        methods: {
            showImage(url, params){
                return image(this.api.image, url, params);
            },
            success(){
                this.$http.get('/api/member/grow', {
                    params: {}
                }).then((response) => {
                    if (response.status == 200){
                        let data = response.data;
                        if (data.code == 200) {
                            this.page = data.data;
                        }
                    }else{
                    }
                });
            }
        },
        created(){
        },
        mounted() {
            window.success = this.success;
        }
    }
</script>

